import type { RouteRecordRaw } from 'vue-router'
import { Layout } from '@/layouts'

/**
 * @ProjectName： naive-admin
 * @FileName： dynamicRoutes
 * @Description: // 动态路由
 * @Author: ellwood
 * @date: 2024/1/29 - 8:32
 * @Version: V1.0.0
 */

export const ROOT_ROUTE_REDIRECT_PATH = '/dashboard'

export const rootRouter: RouteRecordRaw = {
  path: '/',
  name: 'default-router',
  redirect: ROOT_ROUTE_REDIRECT_PATH,
  component: Layout,
  children: [],
}

export const dynamicRoutes: RouteRecordRaw[] = [
  {
    path: '/',
    name: 'index',
    // component: Layout,
    redirect: '/home',
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('~/pages/index.vue'),
        meta: { title: 'Home' },
      },
      /* {
              path: '/workspace',
              name: 'Workspace',
              component: () => import('~/pages/workspace/index.vue'),
              meta: { title: 'Workspace' }
            } */
    ],
  },
]
